<!--
    *后台广告列表页面
    * 
    *
    * @author      3+1项目组.yuanxi
    * @version     2018-02-1 21:44
-->
{extend name="AdminPublic/public" /}
{block name="admin"}
    <html>
 <head></head>
 <body>
  <div class="mws-panel grid_8"> 
   <div class="mws-panel-header"> 
    <span><i class="icon-table"></i>广告列表</span> 
   </div> 
   <div class="mws-panel-body no-padding"> 
    <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
    <form action="/ads/index" method="get">
     <div class="dataTables_filter" id="DataTables_Table_0_filter">
      <label>搜索: <input type="text" name="keywords" aria-controls="DataTables_Table_0"  value="{$keywords}" /></label>
      <input type="submit" value="搜索">
     </div>
    </form>
     <table class="mws-datatable mws-table dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info"> 
      <thead> 
       <tr role="row">
        <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 87px;">Id</th>
        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 121px;">广告名称</th>
        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 121px;">广告链接</th>
        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 112px;">广告图片</th>
        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending" style="width: 74px;">状态</th>
        <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 51px;">操作</th>
       </tr> 
      </thead> 
      <tbody role="alert" aria-live="polite" aria-relevant="all">
      {foreach name='list' item="row"}
       <tr class="odd"  align="center"> 
        <td class=" ">{$row.id}</td> 
        <td class=" ">{$row.name}</td> 
        <td class=" ">{$row.adurl}</td> 
        <td class=" "><img src="{$row.pic}" style="height:50px;" /></td>
        {if condition="($row.status == 0)"}
        <td class=" " align="center">禁用</td>
        {else}
         <td class=" " align="center">开启</td>
        {/if}
        <td class=" " align="center"><a href="/ads/delete/id/{$row.id}" class="btn btn-success"  onclick="return(confirm('确定要删除吗？'))">删除</a><a href="/ads/edit/id/{$row.id}" class="btn btn-info">修改</a></td> 
       </tr>
       {/foreach}
      </tbody>
     </table>
    
     <div class="dataTables_paginate paging_two_button" id="pages">
      {$list->appends($request)->render()}
     </div>
    </div> 
   </div> 
  </div>
 </body>
</html>
{/block}
{block name="title"}广告列表{/block}